package com.xzx.shop_front_api.service;

import com.xzx.shop_front_api.entity.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MembersService {
    public int insertMembers(Members members);
    public Members getMembersByUsername(String username);

    public int updatePassword(String username, String password);
    public int updatePayPassword(int id, String payPassword);

    public Members getMembersById(int id);

    //根据用户名查询账号信息
    public Members getMembersByMobile(String mobile);
    //更新手机号码
    public int updateMobile(int id, String mobile);

    //修改个人信息
    public int updateMyInfo(int id,
                            String username,
                            String nickname,
                            int gender,
                            String birthday
    );
    //更新头像
    public int updateLogo(int id, @Param("logo") String logo);

    //更新认证
    public int updateIsAuth(int id, int isAuth);

    public Members getMemberWithIdCard(int id);

    public List<District> getDistrictBypId(int pId);

    //新增收货地址
    public int insertAddress(Address address);

    //更新收货地址默认值
    public int updateDefaultedAddress(int memberId, int isDefaulted);
    //根据用户id查询收件地址信息
    public List<Address> getMembersAddressListByMemberId(int memberId);

    //根据id查询地区名称
    public District getDistrictById(int id);

    //根据id删除收件地址
    public int deleteAddressById(int id);

    //根据id查询收件地址
    public Address getAddressById(int id);

    //根据会员id和商品id查询足迹
    FootPrint getFootPrintByGoodIdMemberId(int memberId, int goodsId);
    //添加足迹
    int addFootPrint(FootPrint footPrint);
    //我的足迹
    List<FootPrint> getFootPrintByMemberId(int memberId,int page,int limit);
}
